package com.mew.slots.core.game.ajxb.service;

import com.mew.common.enm.SlotsWinType;
import com.mew.common.entity.game.WinFree;
import com.mew.slots.core.common.game.BaseGameService;
import com.mew.slots.core.common.game.vo.BasePlayMsgs;
import com.mew.slots.core.common.messge.response.SlotsPlayResponseMessage;
import com.mew.slots.core.common.vo.StrategyGameVO;
import com.mew.slots.core.game.ajxb.message.AjxbPlayResponseMessage;
import com.mew.slots.core.game.ajxb.roller.AjxbIli;
import com.mew.slots.core.game.ajxb.roller.AjxbXml;
import com.mew.slots.core.game.ajxb.room.AjxbPlayMsgs;
import com.mew.slots.core.game.ajxb.room.AjxbRoom;

public class AjxbService extends BaseGameService {
    @Override
    public BasePlayMsgs startGame(StrategyGameVO player) {
        AjxbRoom room = new AjxbRoom();
        room.init(player.getRollerId(), AjxbIli.getInstance(),player.getWinType()== SlotsWinType.Free.code(),player.getInBetNumber(),player.getControlType());
        room.roundPlayIli();
        return room.getRes();
    }

    @Override
    public SlotsPlayResponseMessage myResp(WinFree winFree, BasePlayMsgs res) {
        AjxbPlayResponseMessage message = new AjxbPlayResponseMessage();
        return message;
    }

    @Override
    public void myAfterResp(SlotsPlayResponseMessage message,StrategyGameVO player, BasePlayMsgs res) {

        ((AjxbPlayResponseMessage)message).openBox = ((AjxbPlayMsgs)res).openBox;
        ((AjxbPlayResponseMessage)message).bounsBox = ((AjxbPlayMsgs)res).bounsBox;

    }

}
